<template>
  <div class="SafetyHeartbeatTable">
      <el-dialog
      :title="dialog.title"
      :visible.sync="dialog.open"
      width="max-content" append-to-body
      center>
      <el-row>
        <el-table :data="tableList" :fit="true" highlight-current-row>
            <el-table-column type="index" label="序号" align="center" width="100px">
                
            </el-table-column>
            <el-table-column prop="equipName" label="安全设备名称" width="150px" align="center">

            </el-table-column>
            <el-table-column prop="createDate" label="心跳记录时间" width="200px" align="center">

            </el-table-column>
        </el-table>
      </el-row>

      </el-dialog>

  </div>
</template>
<script>
import SafetyApi from '@/api/equip/safety';
export default {
    data(){
        return{
            dialog:{
                open: false ,  // 默认隐藏
                title: "",
            },
            tableList:[]
        }
    },
    created(){
        this.init();
    },
    methods:{
        init(){
            this.$Utils.clearData(this.tableList);
        },
        handleCreate(val){
            // 父组件 调用子组件
            this.dialog.open = true; // 显示弹出框
            this.dialog.title = "心 跳 记 录";
            var cond = {
                safetyId: val
            }
            SafetyApi.checkSafetyHeartbeatList(cond)
                .then(res => {
                    this.tableList = res.data
                })
        },

    }
}
</script>

<style>

</style>
